import request from '@/utils/request'

// 获取文章列表
export const getArticleList = (params) => {
  return request.get('/admin/interview/query', {
    params
  })
}

// 新建面经文章
export const createArticle = (data) => {
  return request.post('/admin/interview/create', data)
}

// 删除面经
export const removeArticle = (id) => {
  return request.delete('/admin/interview/remove', {
    data: {
      id
    }
  })
}

// 获取单个详情
export const getArticleDetail = (id) => {
  return request.get('/admin/interview/show', {
    params: {
      id
    }
  })
}

// 修改接口
export const updateArticle = data => {
  return request.put('/admin/interview/update', data)
}
